package ecom.entity;


import java.util.Date;
import java.util.logging.Logger;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import javax.ejb.Timeout;
import javax.ejb.Timer;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

import javax.ejb.Timeout;
import javax.ejb.Timer;
import javax.ejb.TimerService;


import ecom.api.*;

@Entity
public class ConverterEntity {
	

	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
	private long id;
	

	//exemple dollar
	String nameDevice;
	
	//valeur de la device ex:3,55 par rapport a EURO
	Double value;
	
	//date de cette valeur
	Date date;
	
	
	
	
	private static final Logger logger = Logger
			.getLogger("ecom.entity.ConverterEntity");

	
	
	public ConverterEntity(String nameDevice, Double value, Date date) {
		
		
		super();
		logger.info("ConverterEntity constructor avec param");
		this.nameDevice = nameDevice;
		this.value = value;
		this.date = date;
		
	}
	
public ConverterEntity(String nameDevice, Double value) {
		
		
		super();
		logger.info("ConverterEntity constructor avec param");
		this.nameDevice = nameDevice;
		this.value = value;
		
	}
	public ConverterEntity() {
		logger.info("ConverterEntity constructor without param");
		this.nameDevice = nameDevice;
		this.value = value;
		this.date = date;
			
		
	}
	
	
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getNameDevice() {
		return nameDevice;
	}

	public void setNameDevice(String nameDevice) {
		this.nameDevice = nameDevice;
	}

	public Double getValue() {
		return value;
	}

	public void setValue(Double value) {
		this.value = value;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
}
